package com.moly.websocketone.configuration.websocket;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * @Description: 原生的websocket 配置
 * @Author: m01
 * @Date: created at  2018/11/11  20:44
 * @Modified By:
 */
@Configuration

public class OriginalWebsocketConfig {

    @Bean
    public ServerEndpointExporter serverEndpointExporter(){
        //这个类会 自动注册使用了@ServerEndpoint注解声明的Websocket endpoint
        return new ServerEndpointExporter();
    }
}
